{% extends 'base.html' %}

{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h3 class="text-center">用户登录</h3>
                </div>
                <div class="card-body">
                    <form method="post">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="id_phone" class="form-label">手机号</label>
                            <input type="text" class="form-control" id="id_phone" name="phone" required>
                        </div>
                        <div class="mb-3">
                            <label for="id_password" class="form-label">密码</label>
                            <input type="password" class="form-control" id="id_password" name="password" required>
                        </div>
                        <div class="mb-3 form-check">
                            <input type="checkbox" class="form-check-input" id="id_remember" name="remember">
                            <label class="form-check-label" for="id_remember">记住我</label>
                        </div>
                        <div class="d-grid">
                            <button type="submit" class="btn btn-primary">登录</button>
                        </div>
                        <div class="text-center mt-3">
                            <a href="{% url 'register' %}">还没有账号？立即注册</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
